#!/bin/bash
# finding files in the PATH

IFS=:

for i in $PATH; do
    echo "$i"
    for j in $i/*; do
        if [ -x $j ]; then
            echo "  $j"
        fi
    done
done
